This invention concerns an agent system in which an agent generated by an agent server is moved consecutively among communication devices via communication lines. In this agent system, a mobile agent with an individual priority is transmitted from the system server to another system server at a destination.
A typical agent system of the type which has recently been proliferating is shown in FIG. 8. Agent server 50, various communication devices 60 (personal computers, work stations, etc.) and storage device 80, which stores a program to generate agents, are all connected via cable line 90 (or, although not pictured, they may be connected cordlessly). This line 90 is used to transfer agent 70, which we shall discuss shortly, from one device to the next.
In such an agent system, agent server 50 generates, based on a source program, an agent 70 consisting of object code. The agent 70, which has been generated, is transmitted to a designated communication device 60, where the system agent 601 for that device 60 executes it.
Agent systems of the sort described above use two methods to transmit an agent 70. In a first method, the agent is given its destination and target processing but not the route by which it is to reach the destination. In a second method, the agent is given only its target processing and does not receive either its destination or its transmission route.
Regardless of whether the agent is given both its destination and its target processing or only its target processing, certain problems are inherent in the type of agent system described above.
In the first method mentioned above, in which agent 70 is given both its destination and its target processing, when the agent is to be routed through the nodes of a number of specified devices 60, each node will have to be specified, as there is a 1 to 1 correspondence of destinations when the target processing is executed.
Thus if the target processing cannot be accomplished, agent server 50 will have to respecify all of the destinations, which will result in dead time.
In the second method mentioned above, in which the agent is given only its target processing, it will move to an arbitrary location (searching according to a rule) and execute that processing. Once it is given its target processing, the agent will never need to have its target reassigned. However, there is no way to choose a route, so if the processing is sequential, and there is, for example, an application gateway in a fire wall, the attempt of the agent to pass through will be regarded as an access violation. The agent will be unable to continue to the nodes of the devices 60 on the other side of the firewall.
In either method mentioned above (the one in which the agent is given both a destination and the target processing or the one in which it is given only the target processing), agent 70 sets out without knowing the resource state of its destination, device 60. For example, it does not know which regions of the device""s memory are free. If it turns out that the agent is temporarily unable to use the resources of device 60 because, say, there is no free area in the memory to house it, agent 70 will not be generated in that device. It will not return to server 50 within the specified time, and server 50 will have no alternative but to execute error processing.
In order to solve the problems mentioned above, the applicant filed a patent application disclosing the following invention on Mar. 26, 1999.
In this application, the aforesaid communication devices 60 modify the routing data, if necessary, for the agent which was received previously, and restore the agent. This configuration eliminates the need to respecify destinations for the agent. It enables the agent to reach the target destination without routing a specific node. It also checks the resource state of its destination in advance before the agent is transmitted in order to avoid error processing.
The following problem is, however, inherent in the invention mentioned above. The processing time to execute the agent 70 at the designated communication device 60 with node number 3 is not considered in this configuration. As shown in FIG. 9, after the agent 70 is transmitted from node number 1, if an error occurs in the device 60 with node number 3 while the agent 70 is on the way, the agent has no way to reach to the device 60 with node number 3, and will disappear before it reaches there. This means there is no way to notify to the device 60 with node number 1 that an error occurred at node 3. Because of this configuration, there is an inherent problem with the time required for detecting an error in the system.
Another problem in this system is that it can not prioritize the processing of agents when there are a number of agents 70 at a device such as the device 60 with node number 3 as shown in FIG. 10. This is because the agents are processed according to the order they are input.
An object of this invention is to provide an agent system that can easily detect an error in the system and that can prioritize the agents to be processed.
In order achieve this object, each agent according to this invention has an ID and priority number to prioritize the processing of the agent in the designated communication. Once this agent is transmitted to the designated device, the agent is processed according to the priority number when the designated device has more than two agents.
The agent server has a priority inquiring means to inquire as to the priorities of other agents that are already in the designated agent before the agent server transmits the agent to the designated device.
With this invention, a priority altering means alters the priority number of an agent once the agent server receives information about the priorities of other agents in the designated device by the priority inquiring means.
This invention also has a time out detecting means to detect if a mobile agent is executed within a predetermined time period, and an error detecting means to detect an error at a designated communication device by counting the number of times the agent is resent, and to judge if there is an error in the processing.